<script setup lang="ts">
import { NPopconfirm, NButton } from 'naive-ui'

const props = defineProps({
  onOk: {
    type: Function,
    default: () => {}
  },
  onCancel: {
    type: Function,
    default: () => {}
  }
})
</script>

<template>
  <NPopconfirm @negative-click="() => onCancel()" @positive-click="() => onOk()">
    <template #trigger>
      <NButton type="error" text>删除</NButton>
    </template>
    删除后将不可恢复，确定删除吗?
  </NPopconfirm>
</template>

<style lang="scss" scoped></style>
